package com.link2room.rodimus.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by LN on 2017/7/13.10:53
 */
@Entity
@Table(name = "draw_deliver_info")
@DynamicInsert
public class DrawDeliverInfoEntity extends BaseEntity {
    private String receiverName;
    private String prizeType;
    private String address;
    private String isDelivered;
    private String deliverNo;
    private String thirdNo;
    private String courierServicesCompany;
    private String mobile;
    private String openid;
    private String prizeNo;
    private String prizeName;
    private String prizeCode;
    private String activityCode;

    @Basic
    @Column(name = "receiver_name")
    public String getReceiverName() {
        return receiverName;
    }

    public void setReceiverName(String receiverName) {
        this.receiverName = receiverName;
    }

    @Basic
    @Column(name = "prize_type")
    public String getPrizeType() {
        return prizeType;
    }

    public void setPrizeType(String prizeType) {
        this.prizeType = prizeType;
    }

    @Basic
    @Column(name = "address")
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Basic
    @Column(name = "is_delivered")
    public String getIsDelivered() {
        return isDelivered;
    }

    public void setIsDelivered(String isDelivered) {
        this.isDelivered = isDelivered;
    }

    @Basic
    @Column(name = "deliver_no")
    public String getDeliverNo() {
        return deliverNo;
    }

    public void setDeliverNo(String deliverNo) {
        this.deliverNo = deliverNo;
    }

    @Basic
    @Column(name = "third_no")
    public String getThirdNo() {
        return thirdNo;
    }

    public void setThirdNo(String thirdNo) {
        this.thirdNo = thirdNo;
    }

    @Basic
    @Column(name = "courier_services_company")
    public String getCourierServicesCompany() {
        return courierServicesCompany;
    }

    public void setCourierServicesCompany(String courierServicesCompany) {
        this.courierServicesCompany = courierServicesCompany;
    }
    @Basic
    @Column(name = "mobile")
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    @Basic
    @Column(name = "openid")
    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    @Basic
    @Column(name = "prize_no")
    public String getPrizeNo() {
        return prizeNo;
    }

    public void setPrizeNo(String prizeNo) {
        this.prizeNo = prizeNo;
    }
    @Basic
    @Column(name = "prize_name")
    public String getPrizeName() {
        return prizeName;
    }

    public void setPrizeName(String name) {
        this.prizeName = name;
    }
    @Basic
    @Column(name = "prize_code")
    public String getPrizeCode() {
        return prizeCode;
    }

    public void setPrizeCode(String prizeCode) {
        this.prizeCode = prizeCode;
    }
    @Basic
    @Column(name = "activity_code")
    public String getActivityCode() {
        return activityCode;
    }

    public void setActivityCode(String activityCode) {
        this.activityCode = activityCode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        DrawDeliverInfoEntity entity = (DrawDeliverInfoEntity) o;

        if (receiverName != null ? !receiverName.equals(entity.receiverName) : entity.receiverName != null)
            return false;
        if (prizeType != null ? !prizeType.equals(entity.prizeType) : entity.prizeType != null) return false;
        if (address != null ? !address.equals(entity.address) : entity.address != null) return false;
        if (isDelivered != null ? !isDelivered.equals(entity.isDelivered) : entity.isDelivered != null) return false;
        if (deliverNo != null ? !deliverNo.equals(entity.deliverNo) : entity.deliverNo != null) return false;
        if (thirdNo != null ? !thirdNo.equals(entity.thirdNo) : entity.thirdNo != null) return false;
        if (courierServicesCompany != null ? !courierServicesCompany.equals(entity.courierServicesCompany) : entity.courierServicesCompany != null)
            return false;
        if (mobile != null ? !mobile.equals(entity.mobile) : entity.mobile != null) return false;
        if (openid != null ? !openid.equals(entity.openid) : entity.openid != null) return false;
        if (prizeNo != null ? !prizeNo.equals(entity.prizeNo) : entity.prizeNo != null) return false;
        if (prizeName != null ? !prizeName.equals(entity.prizeName) : entity.prizeName != null) return false;
        if (prizeCode != null ? !prizeCode.equals(entity.prizeCode) : entity.prizeCode != null) return false;
        return activityCode != null ? activityCode.equals(entity.activityCode) : entity.activityCode == null;
    }

    @Override
    public int hashCode() {
        int result = receiverName != null ? receiverName.hashCode() : 0;
        result = 31 * result + (prizeType != null ? prizeType.hashCode() : 0);
        result = 31 * result + (address != null ? address.hashCode() : 0);
        result = 31 * result + (isDelivered != null ? isDelivered.hashCode() : 0);
        result = 31 * result + (deliverNo != null ? deliverNo.hashCode() : 0);
        result = 31 * result + (thirdNo != null ? thirdNo.hashCode() : 0);
        result = 31 * result + (courierServicesCompany != null ? courierServicesCompany.hashCode() : 0);
        result = 31 * result + (mobile != null ? mobile.hashCode() : 0);
        result = 31 * result + (openid != null ? openid.hashCode() : 0);
        result = 31 * result + (prizeNo != null ? prizeNo.hashCode() : 0);
        result = 31 * result + (prizeName != null ? prizeName.hashCode() : 0);
        result = 31 * result + (prizeCode != null ? prizeCode.hashCode() : 0);
        result = 31 * result + (activityCode != null ? activityCode.hashCode() : 0);
        return result;
    }
}
